Activity Checklist
- Create two new lists (for all sprites). Call one of them
instrument
and the othertiming
. - Create a new variable (for all sprites) called
recording
For each of your instruments (drum, piano, each sound sample etc.), you will need to add the following items to the
when I receive
block.ifthenrecording=1addtimertotimingaddcattoinstrumentChange the word “cat” in
add [cat] to [instrument v]
to match the name of the message used to play this sound.when I receivedrumplay drum48for0.2beatsifthenrecording=1addtimertotimingaddcattoinstrumentset size to110%wait0.1secsset size to100%- Draw a new sprite and give it a red circle costume. Name this sprite “Record”.
Create a script that sets
recording
to 1 and deletes all ofinstrument
andtiming
when clicked.
Test your project
Try clicking the record button. What happens when you play instruments?
- Create another sprite and give it a costume in the shape of a green arrow. Call this “Play”.
- Create a new variable called
index
for Play only. Now we need to make the playback actually do something. Add this script to “Play”
when Play clickedsetrecordingto0setindexto1reset timerforeverifthen <timerbroadcastchangeindexby1ifthenindex>stop script
Test your project
Press the green play button. what happens?
Now click the red record button and play some instruments. When you’re done, press the green play button again. What happens?
Play some more instruments without pressing record. Then play the green play button again. What happens?